/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hathor.networking.reciever;

import com.hathor.conf.PropertyLoader;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 *
 * @author Kenneth
 */
public class BatchReciever {

    public static void main(String args[]) throws IOException {
        PropertyLoader.loadUserProperties();
        // localhost for testing
        ServerSocket servsock = new ServerSocket(PropertyLoader.getMotherShipPort());
        while (true) {
            Socket sock = servsock.accept();
            System.out.println("Connecting...");
            BatchHandler handlerForSocket = new BatchHandler(sock);
            handlerForSocket.manageBatch();
        }
    }
}
